<?php
namespace app\index\controller;
use \think\Controller;
use \think\Request;
use \think\Session;
use \think\Db;

class Person extends Controller
{   
    public function index()
    {   
       $per = Session::get('person');
        // var_dump($per['phone']);die;
        $sql=Db::name('user')->where(['phone'=>$per['phone']])->find();

        // var_dump($sql['0']);die;
        return $this->fetch('index',['title'=>'用户登录 - 蒸汽男孩论坛','per'=>$per,'sql'=>$sql]);
    }


    public function modify()
    {   
        $per = Session::get('person');
        // var_dump($per);die;
         // $nick='吴明';
         $sql=Db::name('user')->where(['phone'=>$per['phone']])->select();
        // var_dump($sql['0']);die;
         return $this->fetch('modify',['title'=>'用户登录 - 蒸汽男孩论坛','sql'=>$sql['0'],'per'=>$per]);
    }


    





}
